<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <jsp:include page="../../../../../head.jsp"/>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>角色列表</title>
</head>
<script type="text/javascript">
    var zTree, rMenu;
    var setting = {
        async: {
            enable: true,
            url: "role-data",
            dataFilter: function (treeId, parentNode, childNodes) {
                if (!childNodes)
                    return null;
                return childNodes;
            }
        },
        data: {
            simpleData: {
                pIdKey: "parent.id"
            }
        },
        callback: {
            onClick: function (event, treeId, treeNode, clickFlag) {
                $('#center', window.parent.document).attr("src",
                                                          "role-module?id=" + treeNode.id);
            }
        }
    };
    $(document).ready(function () {
        $.fn.zTree.init($("#roletree"), setting);
        zTree = $.fn.zTree.getZTreeObj("roletree");
        rMenu = $("#rMenu");
        // 		$("#treeButton input:button").button().css("font-size", "60%");
    });
</script>
<body class="ui-widget-content remove_border" style="height: 100%">
<div>

    <ul id="roletree" class="ztree"></ul>
</div>
</body>
</html>
